/*
 * @Author: hyq
 * @LastEditors: hyq
 * @Description: 正则检测
 * @Date: 2023-12-05 10:58:13
 */

/**
 * 手机号校验
 * @param phone
 * @returns boolean
 */
export const cellPhoneReg =
  /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
export function isCellPhone(phone: string): boolean {
  return cellPhoneReg.test(phone)
}

/**
 * 纯数字
 */
export function isPureNumber(msg: string) {
  const reg = /^[0-9]{1,}$/
  return reg.test(msg)
}
